﻿using SuddenDeath.Domain.Services.FileManager.elFinder.Responses;
using SuddenDeath.Domain.Services.FileManager.elFinder.Utils;

namespace SuddenDeath.Domain.Services.FileManager.elFinder.Commands
{
    public class Init : ICommand
    {
        #region ICommand Members

        public Response Execute()
        {
            var folder = new Folder(Configuration.Configuration.RootPath);

            var response = new InitResponse { cwd = folder.Cwd, cdc = folder.Contents, tree = folder.Tree };

            return response;
        }

        #endregion
    }
}
